/**
 * @Author: 张乐
 * @Date: 2023/03/08
 * @Version: 1.0
 * @Content:
 */

import dayjs from 'dayjs'

/**
 * 时间格式化
 * @param time
 * @param fmt
 * @returns {string|string}
 */
export const formatTimeDate = (time: number, fmt = 'YYYY-MM-DD HH:mm:ss') => {
  return time ? dayjs(Number(time)).format(fmt) : ''
}
